<template>
  <div class="my-setting">
    <div class="my-item">
      <div class="my-list box box-align-center" @click="linkTo('changePassword')">
         修改密码
      </div>
    </div>
    <div @click="loginOut" class="btn">退出</div>
  </div>
</template>
<script>
let CONSTANT = require('../../../wechat/static/constant/constant.js'),
    common = require("../../../wechat/static/common/common.js");
  export default {
    data() {
      return {
        listlist:'',
        infoObj:'',
        avatar:'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3987166397,2421475227&fm=27&gp=0.jpg'
      }
    },
    components: {
      
    },
    mounted() {

    },
    methods: {
      linkTo(link){
        this.$router.push(link)
      },
      loginOut(){
        let that = this;
        this.$vux.confirm.show({
          content: '是否退出登录?',
          onShow () {
            console.log('plugin show')
          },
          onHide () {
            console.log('plugin hide')
          },
          onCancel () {
            console.log('plugin cancel')
          },
          onConfirm () {
            common.setCookie("sessionId", '');
            that.$router.replace('/login')
          }
        })
      }

    }
  };
</script>
<style lang="less">
  .my-setting {
    background-color: #f2f2f2;
    height: 100%;
    .my-item{
      background-color: #fff;
      margin:  0 auto;
      padding-left: .3rem;
    }
    .my-list{
        position: relative;
        height: .98rem;
        font-size: .32rem;
        color: #333;
        padding-right: .3rem;
        &:after{
            content:'';
            position: absolute;
            right: .3rem;
            top: .41rem;
            width: .15rem;
            height:.15rem;
            border-top: 1px solid #333;
            border-right: 1px solid #333;
            -webkit-transform: rotate(45deg);
        }
    }
    .btn{
        width: 7.5rem;
        height: .88rem;
        text-align: center;
        line-height: .88rem;
        background-color: #198AE7;
        font-size: .32rem;
        color: #fff;
        position: absolute;
        bottom: 0;
    }
  }
</style>

